import axios from '../request';
// 获取展品分页数据
export interface Showpiece {
  companyId: number;
  typeId: number;
  ageId: number;
  levelId: number;
  sourceId: number;
  value?: string;
  pageNo?: string;
  pageSize?: string;
}
export interface RecommendInfo {
  type: number;
  pageSize: number;
}
export interface DoorInfo {
  value: string;
  pageNo: number;
  pageSize: number;
}
export const doorList = (data: DoorInfo) => {
  return axios.get<any>(`api/project/door`, data);
};
export const showpieceList = (data: Showpiece) => {
  return axios.get<any>(`api/showpiece/door`, data);
};
export const Showpiecedetail = (showpieceid: number | string) => {
  return axios.get<any>(`/api/showpiece/detail/${showpieceid}`, {});
};
export const recommendList = (data: RecommendInfo) => {
  return axios.get<any>(`api/recommend/list/${data.type}?pageSize=${data.pageSize}`, {});
};
interface AddInfo {
  refType: number;
  refId?: number | string;
}
//点赞
export const AddLike = (data: AddInfo) => {
  return axios.post<any>(`api/interact/like`, data);
};
//关注
export const AddFollow = (data: AddInfo) => {
  return axios.post<any>(`api/interact/follow`, data);
};
//获取展品相关数据
export const correlation = (id: number | string) => {
  return axios.get<any>(`api/showpiece/correlation/${id}?pageSize=10`, {});
};
//获取展品相关数据http://101.34.143.36:8882/api/project/exhibitions/id?pageSize=10
export const projectExhibitions = (id: number | string) => {
  return axios.get<any>(`api/project/exhibitions/${id}?pageSize=10`, {});
};
